<%@page import="java.sql.SQLException"%>
<%@page import="java.sql.ResultSet"%>
<%@page import="java.sql.Statement"%>
<%@page import="java.sql.DriverManager"%>
<%@page import="java.sql.Connection"%>
<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
		<link rel="stylesheet" href="css/kgvb.css" type="text/css"/>
		<title>Simple Nucleotide Polymorphisms (dbSNP 131)</title>
	</head>
	<body>
		<%
			String q = request.getParameter("name");
			try {	
				Class.forName("com.mysql.jdbc.Driver");
			} catch (ClassNotFoundException cnfe) {
				cnfe.printStackTrace();
			}
		
			Connection conn = null;
			try {
				String url = "jdbc:mysql://localhost/hg19";
				conn = DriverManager.getConnection(url, "root", "tlsehddl1");
				Statement stmt = conn.createStatement();
				ResultSet rs = stmt.executeQuery("select * from snp131 where name='" + q + "';");
				
				while (rs.next()) {
		%>
			<div id="titlePanel">Simple Nucleotide Polymorphisms (dbSNP 131)</div>
			<div id="resultPanel">
				<%=rs.getString(1)%>
				<%=rs.getString(2)%>
				<%=rs.getString(3)%>
				<%=rs.getString(4)%>
				<%=rs.getString(5)%>
				<%=rs.getString(6)%>
				<%=rs.getString(7)%>
				<%=rs.getString(8)%>
				<%=rs.getString(9)%>
				<%=rs.getString(10)%>
				<%=rs.getString(11)%>
				<%=rs.getString(12)%>
				<%=rs.getString(13)%>
				<%=rs.getString(14)%>
				<%=rs.getString(15)%>
				<%=rs.getString(16)%>
				<%=rs.getString(17)%>
				<%=rs.getString(18)%>
			</div>	
		<%
				}
			} catch (SQLException se) {
				se.printStackTrace();
			}			
		%>
	</body>
</html>
